package com.my.code.testcode.读写锁;

import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 * 描述:
 * 读写锁
 *
 * @author 54485
 * @create 2018-10-01 13:00
 */
public class ReadAndWriteLock {

    static ReentrantReadWriteLock lock = new ReentrantReadWriteLock();

    public static void main(String[] args) {
        ReentrantReadWriteLock.WriteLock writeLock = lock.writeLock();
        ReentrantReadWriteLock.ReadLock readLock = lock.readLock();
    }
}
